﻿@model Icoders.MarketTracker.Core.MasterData.Product

@{
    ViewBag.Title = "Create";
}

<h2>Create</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Product</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.Name)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>

        
        <div class="editor-label">
            @Html.Label("Brand")
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.ProductBrandId, new SelectList(ViewBag.ProductBrandList, "value", "text"), "----------Select Brand-----------")
            @Html.ValidationMessageFor(model => model.ProductBrandId)
        </div>
        <div class="editor-label">
            @Html.Label("Client")
        </div>
        <div class="editor-field">
            @*@Html.EditorFor(model => model.ClientId)*@
            @Html.DropDownListFor(model => model.ClientId, new SelectList(ViewBag.ClientList, "value", "text"), "----------Select Client-----------")
            @Html.ValidationMessageFor(model => model.ClientId)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Price)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Price)
            @Html.ValidationMessageFor(model => model.Price)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Milles)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Milles)
            @Html.ValidationMessageFor(model => model.Milles)
        </div>
        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}

<div class="button-link">
 @Html.ActionLink("Back to List", "Index")    
</div>
